<!--
 * @Author: chenyulei yulei.chen@fa-software.com
 * @Date: 2023-12-14 10:51:14
 * @LastEditors: chenyulei yulei.chen@fa-software.com
 * @LastEditTime: 2023-12-15 16:38:25
 * @FilePath: /mycim4-oms-ui/src/components/QueryBox/components/operation.vue
 * @Description: Searc 操作区域
-->
<template>
  <div class="query-operation">
    <el-button :disabled="props.disabled.query" type="primary" @click="query">
      {{ $t("query") }}
    </el-button>
    <el-button :disabled="props.disabled.clear" @click="clear">
      {{ $t("clear") }}
    </el-button>
  </div>
</template>

<script setup lang="ts">
import type { OperationProps } from "../types.ts";

defineOptions({
  name: "QueryOperation"
});

const props = withDefaults(defineProps<OperationProps>(), {});

//#region emit
interface Emits {
  (e: "query", ...args: any[]): void;
  (e: "clear", ...args: any[]): void;
}
const emit = defineEmits<Emits>();
//#endregion

const query = () => emit("query");
const clear = () => emit("clear");
</script>

<style lang="scss" scoped>
/* Add your styles here if needed */
</style>
